package com.authine.cloudpivot.web.api.dao;

import com.authine.cloudpivot.web.Utils.MyMapper;
import com.authine.cloudpivot.web.api.vo.ProjectTeam;
import com.authine.cloudpivot.web.api.vo.XMQD;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Repository
public interface ProjectTeamMapper extends MyMapper<ProjectTeam> {

    ProjectTeam subjectNumberUpdate(@Param("id") String id);

    List<ProjectTeam> selectAllByStatus(@Param("addGslxStatus") String addGslxStatus);

    void updateStatus(@Param("id")String id);

    List<ProjectTeam> getRole(@Param("subjectId")String subjectId);

    List<String> getRoleId(@Param("role")String role);

    void creatOrgRoleUser(String id,String createdTime,String creater,String ouScope,String roleId,String userId,String unitType);

    List<String> selectUsers(String roleType,String projectId);

    void updateXMQD(String projectId,String roleType,String users,String memberTotal);

    List<String> selectSubjectPerson(@Param("projectId")String projectId);

    void insertProject(@Param("creater")String creater, @Param("owner")String owner, @Param("createdDeptId")String createdDeptId, @Param("ownerDeptId")String ownerDeptId, @Param("peojectNo")String peojectNo, @Param("name") String name , @Param("id")String id, @Param("subjectName")String subjectName, @Param("member")String member, @Param("role")String role, @Param("startTime")Date startTime, @Param("endTime")Date endTime,@Param("creaerTime")Date creaerTime);

    List<ProjectTeam> getProject(@Param("subjectName") String subjectName, @Param("role") String role);

    List<ProjectTeam> getAll(@Param("role1")String role1, @Param("role2")String role2);

    void insertProjectTerm(@Param("p")ProjectTeam p);

    List<XMQD> getMemberTotal(String projectId);

    void delOrgByRoleIdAndUserId (String roleId,String userId);

    Integer updatePerson(@Param("tableName")String tableName, @Param("columns")String columns, @Param("persons")String persons, @Param("id")String id);
}